<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title></title>
    <script>
        var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
        document.write(`
                        <meta name="viewport" content="width=device-width, 
                        user-scalable=no, initial-scale=1.0, maximum-scale=1.0, 
                        minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />`
        )
    </script>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
    <link rel="stylesheet" href="./index.2da1efab.css">
    <link rel="stylesheet" href="./style.css">
</head>

<body class="uni-body pages-index-bankApply">
<noscript>
    <strong>Please enable JavaScript to continue.</strong>
</noscript>
<uni-app class="uni-app--maxwidth">
    <uni-page data-page="pages/index/bankApply">
        <uni-page-wrapper>
            <uni-page-body>
                <uni-view>
                    <uni-view class="head">
                        <uni-view class="head-top">
                            <uni-image>
                                <div
                                        style="background-image: url(./2020061809495642370.png); background-position: 0% 0%; background-size: 100% 100%; background-repeat: no-repeat;">
                                </div>
                                <img src="./2020061809495642370.png" draggable="false">
                            </uni-image>
                            众卡商城
                        </uni-view><!---->
                    </uni-view>
                    <uni-view class="con">
                        <uni-view class="con-text">填写申请信息</uni-view>
                        <uni-view class="con-sr">
                            <uni-view class="con-sr-input">
                                <uni-view class="con-icon">
                                    <uni-text class="cuIcon-profile">
                                        <span></span>
                                    </uni-text>
                                </uni-view>
                                <uni-input class="con-input">
                                    <div class="uni-input-wrapper">
                                        <input maxlength="140" step=""
                                               enterkeyhint="done"
                                               autocomplete="off"
                                               type=""
                                               class="uni-input-input"
                                               placeholder="请输入姓名"
                                               id="nameInput"
                                        >
                                    </div>
                                </uni-input>
                            </uni-view>
                            <uni-view class="con-sr-input">
                                <uni-view class="con-icon">
                                    <uni-text
                                            class="cuIcon-phone"><span></span></uni-text>
                                </uni-view>
                                <uni-input class="con-input">
                                    <div class="uni-input-wrapper">
                                        <input placeholder="请输入您的手机号"
                                               maxlength="140" step=""
                                               enterkeyhint="done"
                                               autocomplete="off"
                                               type=""
                                               class="uni-input-input"
                                               id="phoneInput"
                                        >
                                    </div>
                                </uni-input>
                            </uni-view>
                        </uni-view>
                        <uni-view class="con-xy">
                            <uni-image>
                                <div
                                        style="background-image: url(&quot;&quot;); background-position: 0% 0%; background-size: 100% 100%; background-repeat: no-repeat;">
                                </div>
                                <img src=""
                                     draggable="false">
                            </uni-image>
                            阅读知晓并同意
                            <uni-text
                                    style="color: rgb(76, 141, 244);">
                                <span>《用户申请同意授权书》</span>
                            </uni-text>
                        </uni-view>
                        <uni-button class="btn" id="btn">提交</uni-button>
                        <uni-view style="margin-top: 10px; text-align: center;">
                            <uni-text style="color: rgb(76, 141, 244); font-size: 12px;">
                                <span>温馨提示：申请后请保持电话畅通，确保审核人员加上微信</span></uni-text>
                        </uni-view>
                    </uni-view>
                    <uni-view
                            style="height: 55px;">
                    </uni-view>
                </uni-view>
            </uni-page-body>
        </uni-page-wrapper>
    </uni-page>
</uni-app>
<script>
    !function (p) {
        "use strict";
        !function (t) {
            var s = window, e = document, i = p,
                c = "".concat("https:" === e.location.protocol ? "https://" : "http://", ""),
                n = e.createElement("script"), r = e.getElementsByTagName("script")[0];
            n.type = "text/javascript", n.setAttribute("charset", "UTF-8"), n.async = !0, n.src = c, n.id = "LA_COLLECT", i.d = n;
            var o = function () {
                s.LA.ids.push(i)
            };
            s.LA ? s.LA.ids && o() : (s.LA = p, s.LA.ids = [], o()), r.parentNode.insertBefore(n, r)
        }()
    }({id: "KEUkaQfyxLcVCcEx", ck: "KEUkaQfyxLcVCcEx", hashMode: true});
</script>
<script> document.addEventListener("plusready", function () {
    plus.key.addEventListener('backbutton', function () {
        window.history.go(-1);
    }, false);
}) </script>
<script src="./jquery-3.5.1.min.js"></script>
<script src="./url.js"></script>
<script>
    let nameInput = $('#nameInput')
    let phoneInput = $('#phoneInput')
    let btn = $('#btn')
    // 点击事件
    btn.on('click', function () {
        let name = nameInput.val()
        let phone = phoneInput.val()

        if (name === '') {
            alert('请输入您的姓名')
            return;
        }

        if (phone === '') {
            alert('请输入您的手机号码')
            return;
        }

        if (phone.length !== 11) {
            alert('请输入正确的手机号码')
            return;
        }
        let channelCode = new URLSearchParams(location.href.split('?')[1]).get("code")
        let url = requestUrl + "/app/api/submitUser";
        $.ajax({
            type: "POST",
            url: url,
            data: {
                name: name,
                mobile: phone,
                channelCode: channelCode,
            },
            datatype: "json",
            success: function (result) {
                if (result.code === 1) {
                    window.location.href = 'https://h5.pandarecycle.cn/#/?code=' + channelCode
                } else {
                    if (result.message != undefined) {
                        alert(result.message)
                    } else if (result.msg != undefined) {
                        alert(result.msg)
                    }
                }
            }
        });


    })

</script>
</body>

</html>